from asyncore import write
import json

# [波峰出现时刻, 人id, 第几个通道(从0开始)]
def sendPeakTimeToUnity(data):
    with open("dataForUnity.json", "a", encoding="utf-8") as f:
        json.dump(data, f)
        f.write("\n")

# [时刻，人id，频率]
def sendFrequenceToUnity(data):
    with open("frequence.json", "a", encoding="utf-8") as f:
        json.dump(data, f)
        f.write("\n")